(function () {
    echarts_1();
    function echarts_1() {
        // 基于准备好的dom，初始化echarts实例
        var myChart = echarts.init(document.getElementById('echarts_0'));

        var data = [
            {value: 25,name: 'LPG'},
            {value: 25,name: 'LNG'},
            {value: 25,name: 'CNG'},
            {value: 25,name: '管道'},
        ];

        option = {
            backgroundColor: 'rgba(0,0,0,0)',
            tooltip: {
                trigger: 'item',
                formatter: "{b}: <br/> ({d}%)"
            },
            color: ['#6BB136', '#D84646', '#FDC345', '#83EBFA'],
            legend: { //图例组件，颜色和名字
                x: '70%',
                y: 'center',
                orient: 'vertical',
                itemGap: 12, //图例每项之间的间隔
                itemWidth: 10,
                itemHeight: 10,
                icon: 'rect',
                data: ['LPG', 'LNG', 'CNG', '管道'],
                textStyle: {
                    color: [],
                    fontStyle: 'normal',
                    fontFamily: '微软雅黑',
                    fontSize: 12,
                }
            },
            series: [{
                name: '行业占比',
                type: 'pie',
                clockwise: false, //饼图的扇区是否是顺时针排布
                minAngle: 20, //最小的扇区角度（0 ~ 360）
                center: ['35%', '50%'], //饼图的中心（圆心）坐标
                radius: [35, 55], //饼图的半径
                avoidLabelOverlap: true, ////是否启用防止标签重叠
                itemStyle: { //图形样式
                    normal: {
                        borderColor: '#1e2239',
                        borderWidth: 2,
                    },
                },
                label: { //标签的位置
                    normal: {
                        show: true,
                        position: 'inside', //标签的位置
                        // formatter: "{d}%",
                        textStyle: {
                            color: '#fff',
                        }
                    },
                    emphasis: {
                        show: true,
                        textStyle: {
                            fontWeight: 'bold'
                        }
                    }
                },
                data: data
            }, {
                name: '',
                type: 'pie',
                clockwise: false,
                silent: true,
                minAngle: 20, //最小的扇区角度（0 ~ 360）
                center: ['35%', '50%'], //饼图的中心（圆心）坐标
                radius: [20, 30], //饼图的半径
                itemStyle: { //图形样式
                    normal: {
                        borderColor: '#83EBFA',
                        borderWidth: 1.5,
                        opacity: 0.21,
                    }
                },
                label: { //标签的位置
                    normal: {
                        show: false,
                    }
                },
                data: data
            }]
        };

        // 使用刚指定的配置项和数据显示图表。
        myChart.setOption(option);
        window.addEventListener("resize",function(){
            myChart.resize();
        });
    }
    echarts_5();
    function echarts_5() {
        // 基于准备好的dom，初始化echarts实例
        var myChart = echarts.init(document.getElementById('echarts_5'));

        var xData = function () {
            var data = ['管道占压', '老旧小区', '人口密集区', '配气站', '储罐区'];

            return data;
        }();

        var data = [28, 22, 20, 16, 12]

        option = {
            // backgroundColor: "#141f56",
            
            tooltip: {
                show: "true",
                trigger: 'item',
                backgroundColor: 'rgba(0,0,0,0.4)', // 背景
                padding: [8, 10], //内边距
                // extraCssText: 'box-shadow: 0 0 3px rgba(255, 255, 255, 0.4);', //添加阴影
                formatter: function (params) {
                    if (params.seriesName != "") {
                        return params.name + ' ：  ' + params.value + '个';
                    }
                },

            },
            grid: {
                borderWidth: 0,
                top: 5,
                bottom: 25,
                left: 0,
                right: 0,
                textStyle: {
                    color: "#fff"
                }
            },
            xAxis: [{

                type: 'category',

                axisTick: {
                    show: false
                },
                axisLine: {
                    show: true,
                    lineStyle: {
                        color: '#363e83',
                    }
                },
                axisLabel: {
                    inside: false,
                    textStyle: {
                        color: '#bac0c0',
                        fontWeight: 'normal',
                        fontSize: '12',
                    },
                    // interval:0,
                    // rotate:40
                    // formatter:function(val){
                    //     return val.split("").join("\n")
                    // },
                },
                data: xData,
            }, {
                type: 'category',
                axisLine: {
                    show: false
                },
                axisTick: {
                    show: false
                },
                axisLabel: {
                    show: false
                },
                splitArea: {
                    show: false
                },
                splitLine: {
                    show: false
                },
                data: xData,
            }],
            yAxis: {
                show: false,
                type: 'value',
                axisTick: {
                    show: false
                },
                axisLine: {
                    show: true,
                    lineStyle: {
                        color: '#32346c',
                    }
                },
                splitLine: {
                    show: true,
                    lineStyle: {
                        color: '#32346c ',
                    }
                },
                axisLabel: {
                    textStyle: {
                        color: '#bac0c0',
                        fontWeight: 'normal',
                        fontSize: '12',
                    },
                    formatter: '{value}',
                },
            },
            series: [{
                // name: '生师比(%)',
                type: 'bar',
                itemStyle: {
                    normal: {
                        show: true,
                        color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
                            offset: 0,
                            color: '#00c0e9'
                        }, {
                            offset: 1,
                            color: '#3b73cf'
                        }]),
                        barBorderRadius: 50,
                        borderWidth: 0,
                    },
                    emphasis: {
                        shadowBlur: 15,
                        shadowColor: 'rgba(105,123, 214, 0.7)'
                    }
                },
                zlevel: 2,
                barWidth: '20%',
                data: data,
            },
            {
                name: '',
                type: 'bar',
                xAxisIndex: 1,
                zlevel: 1,
                itemStyle: {
                    normal: {
                        color: '#121847',
                        borderWidth: 0,
                        shadowBlur: {
                            shadowColor: 'rgba(255,255,255,0.31)',
                            shadowBlur: 10,
                            shadowOffsetX: 0,
                            shadowOffsetY: 2,
                        },
                    }
                },
                barWidth: '20%',
                data: [30, 30, 30, 30, 30]
            }
            ]
        }


        // 使用刚指定的配置项和数据显示图表。
        myChart.setOption(option);
        window.addEventListener("resize", function () {
            myChart.resize();
        });
    }


    skill()
    function skill() {
        let myChart = echarts.init(document.querySelector("#echarts_4"));
        let myColor = ["#1089E7", "#F57474", "#56D0E3", "#F8B448", "#8B78F6"];
        let option = {
            tooltip: {
                trigger: 'axis',
                axisPointer: {
                    type: 'shadow'
                },
                formatter: '{b}：{c}个',
            },
            grid: {
                top: "3%",
                left: "20%",
                bottom: "10%"
            },
            xAxis: {
                show: true,
                axisLine: {
                    show: false,
                    lineStyle: {
                        color: '#363e83',
                    }
                },
                "splitLine": {
                    "show": false
                },
                axisLabel: {
                    inside: false,
                    textStyle: {
                        color: '#bac0c0',
                        fontWeight: 'normal',
                        fontSize: '12',
                    },
                    // interval:0,
                    // rotate:40
                    // formatter:function(val){
                    //     return val.split("").join("\n")
                    // },
                }
            },

            yAxis: {
                type: 'category',
                // inverse: true,
                data: ["万安", "金山", "白马关", "新盛", "鄢家", "略坪", "调元"],
                //不显示y轴线条
                axisLine: {
                    show: false
                },
                // 不显示刻度
                axisTick: {
                    show: false
                },
                axisLabel: {
                    color: "#fff"
                },
                "splitLine": {
                    "show": false
                }

            },
            series: [
                {
                    name: 'bar',
                    type: 'bar',
                    barCategoryGap: 50,
                    barWidth: 10,
                    itemStyle: {
                        barBorderRadius: 20,
                        // params 传进来的是柱子对象
                        color: function (params) {
                            // dataIndex 是当前柱子的索引号
                            return myColor[params.dataIndex];
                        }
                    },
                    data: [23, 30, 11, 13, 18, 5, 10],
                    // label:{
                    //     normal:{
                    //         show: true,
                    //         // 图形内显示
                    //         position: "inside",
                    //         // 文字的显示格式
                    //         formatter: "{c}%"
                    //     }
                    // },
                    // yAxisIndex: 0,
                },
                // {
                //     name: 'box',
                //     type: 'bar',
                //     barCategoryGap: 50,
                //     barWidth: 15,
                //     itemStyle: {
                //         color: "none",
                //         borderColor: "#00c1de",
                //         borderWidth: 3,
                //         barBorderRadius: 15
                //     },
                //     data: [100, 100, 100, 100, 100,100,100],
                //     yAxisIndex: 1,
                // }
            ]
        };
        myChart.setOption(option);
        window.addEventListener("resize", function () {
            myChart.resize();
        });

    }

    flow();
    function flow() {
        let myChart = echarts.init(document.querySelector("#echarts_3"));
        let option = {
            tooltip: {
                trigger: 'axis',
                formatter: function (params) {
                    let str = params[0].name + '<br/>'
                    params.forEach((item) => {
                        str +=
                        item.marker +
                        item.seriesName +
                        '：' +
                        item.value +
                        '立方<br/>'
                    })
                    return str
                },
            },
            legend: {
                x: 'right',
                top: "0%",
                textStyle: {
                    color: "#4c9bfd",
                    fontSize: "12"
                }
            },
            grid: {
                left: "10",
                top: "30",
                right: "10",
                bottom: "10",
                containLabel: true
            },
            xAxis: [
                {
                    type: 'category',
                    boundaryGap: false,
                    data: ["2018年", "2019年", "2020年", "2021年(截止6月)"],
                    // 文本颜色为#4c9bfd  文字大小为 12
                    axisLabel: {
                        textStyle: {
                            color: '#bac0c0',
                            fontWeight: 'normal',
                            fontSize: 12,
                        },
                    },
                    // x轴线的颜色为   rgba(255,255,255,.2)
                    axisLine: {
                        lineStyle: {
                            color: "rgba(255,255,255,.2)"
                        }
                    },
                }
            ],
            yAxis: [
                {
                    type: 'value',
                    // 文本颜色为#4c9bfd  文字大小为 12
                    axisLabel: {
                        textStyle: {
                            color: '#bac0c0',
                            fontWeight: 'normal',
                            fontSize: 12,
                        },
                    },
                    // x轴线的颜色为   rgba(255,255,255,.2)
                    axisLine: {
                        lineStyle: {
                            color: "rgba(255,255,255,.2)"
                        }
                    },
                    // 修改分割线的颜色
                    splitLine: {
                        lineStyle: {
                            color: "rgba(255,255,255,.1)"
                        }
                    }
                }
            ],
            series: [
                {
                    name: '民用',
                    // smooth: true,
                    type: 'line',
                    // 单独修改线的样式
                    lineStyle: {
                        color: "#00D2F6",
                        width: 2
                    },
                    // 填充区域
                    areaStyle: {
                        // 渐变色，只需要复制即可
                        color: new echarts.graphic.LinearGradient(
                            0,
                            0,
                            0,
                            1,
                            [
                                {
                                    offset: 0,
                                    color: "rgba(1, 132, 213, 0.4)"   // 渐变色的起始颜色
                                },
                                {
                                    offset: 0.8,
                                    color: "rgba(1, 132, 213, 0.1)"   // 渐变线的结束颜色
                                }
                            ],
                            false
                        ),
                        shadowColor: "rgba(0, 0, 0, 0.1)"
                    },
                    // 设置拐点 小圆点
                    symbol: "circle",
                    // 拐点大小
                    symbolSize: 8,
                    // 设置拐点颜色以及边框
                    itemStyle: {
                        color: "#00D2F6",
                        borderColor: "rgba(221, 220, 107, .1)",
                        borderWidth: 12
                    },
                    // 开始不显示拐点， 鼠标经过显示
                    showSymbol: false,
                    data: [130, 440, 150, 240, 180],
                },
                {
                    name: '非居民',
                    // smooth: true,
                    type: 'line',
                    // 单独修改线的样式
                    lineStyle: {
                        color: "#FFA92C",
                        width: 2
                    },
                    // 填充区域
                    areaStyle: {
                        // 渐变色，只需要复制即可
                        color: new echarts.graphic.LinearGradient(
                            0,
                            0,
                            0,
                            1,
                            [
                                {
                                    offset: 0,
                                    color: "rgba(0, 216, 135, 0.4)"
                                },
                                {
                                    offset: 0.8,
                                    color: "rgba(0, 216, 135, 0.1)"
                                }
                            ],
                            false
                        ),
                        shadowColor: "rgba(0, 0, 0, 0.1)"
                    },
                    // 设置拐点 小圆点
                    symbol: "circle",
                    // 拐点大小
                    symbolSize: 8,
                    // 设置拐点颜色以及边框
                    itemStyle: {
                        color: "#FFA92C",
                        borderColor: "rgba(221, 220, 107, .1)",
                        borderWidth: 12
                    },
                    // 开始不显示拐点， 鼠标经过显示
                    showSymbol: false,
                    data: [130, 220, 120, 440,],
                }
            ]
        }
        myChart.setOption(option);
        window.addEventListener("resize", function () {
            myChart.resize();
        });
    }


    netLength();
    function netLength() {
        let myChart = echarts.init(document.querySelector("#echarts_2"));
        let option = {
            color: ['#00A9FE', '#356DF6', '#F6B54B'],
            tooltip: {
                trigger: 'axis',
                axisPointer: {            // Use axis to trigger tooltip
                    type: 'shadow'        // 'shadow' as default; can also be 'line' or 'shadow'
                },
                formatter: function (params) {
                    let str = params[0].name + '<br/>'
                    params.forEach((item) => {
                        str +=
                        item.marker +
                        item.seriesName +
                        '：' +
                        item.value +
                        '千米<br/>'
                    })
                    return str
                },
            },
            // legend: {
            //     data: ['次高压', '中压', '低压']
            // },
            grid: {
                top: '3%',
                left: '3%',
                right: '0%',
                bottom: '3%',
                containLabel: true
            },
            xAxis: {
                type: 'category',
                data: ['10年以下', '10-20年', '20-30年', '30年以上'],
                axisLabel: {
                    textStyle: {
                        color: '#bac0c0',
                        fontWeight: 'normal',
                        fontSize: 12,
                    },
                },

            },
            yAxis: {
                type: 'value',
                splitLine: {
                    show: false
                },
                axisLabel: {
                    textStyle: {
                        color: '#bac0c0',
                        fontWeight: 'normal',
                        fontSize: 12,
                    },
                },
            },
            series: [
                {
                    name: '次高压',
                    type: 'bar',
                    stack: 'total',
                    barWidth: 20,
                    // label: {
                    //     show: true
                    // },
                    emphasis: {
                        focus: 'series'
                    },

                    data: [320, 302, 301, 334]
                },
                {
                    name: '中压',
                    type: 'bar',
                    stack: 'total',
                    barWidth: 20,
                    // label: {
                    //     show: true
                    // },
                    emphasis: {
                        focus: 'series'
                    },
                    data: [120, 132, 101, 134]
                },
                {
                    name: '低压',
                    type: 'bar',
                    stack: 'total',
                    barWidth: 20,
                    // label: {
                    //     show: true
                    // },
                    emphasis: {
                        focus: 'series'
                    },
                    data: [220, 182, 191, 234]
                },

            ]
        };
        myChart.setOption(option);
        window.addEventListener("resize", function () {
            myChart.resize();
        });
    }

    flow1();
    function flow1() {
        let myChart = echarts.init(document.querySelector("#echarts_1"));
        let option = {
            tooltip: {
                trigger: 'axis',
                formatter: function (params) {
                    let str = params[0].name + '<br/>'
                    params.forEach((item) => {
                        str +=
                        item.marker +
                        item.seriesName +
                        '：' +
                        item.value +
                        '户<br/>'
                    })
                    return str
                },
            },
            legend: {
                orient: "horizontal",
                x: 'center',
                y:'bottom',
                textStyle: {
                    color: "#4c9bfd",
                    fontSize: "12"
                }
            },
            grid: {
                left: "10",
                top: "30",
                right: "10",
                bottom: "20%",
                containLabel: true
            },
            xAxis: [
                {
                    type: 'category',
                    boundaryGap: false,
                    data: ["2019年", "2020年", "2021年"],
                    // 文本颜色为#4c9bfd  文字大小为 12
                    axisLabel: {
                        textStyle: {
                            color: '#bac0c0',
                            fontWeight: 'normal',
                            fontSize: 12,
                        },
                    },
                    // x轴线的颜色为   rgba(255,255,255,.2)
                    axisLine: {
                        lineStyle: {
                            color: "rgba(255,255,255,.2)"
                        }
                    },
                }
            ],
            yAxis: [
                {
                    type: 'value',
                    // 文本颜色为#4c9bfd  文字大小为 12
                    axisLabel: {
                        textStyle: {
                            color: '#bac0c0',
                            fontWeight: 'normal',
                            fontSize: 12,
                        },
                    },
                    // x轴线的颜色为   rgba(255,255,255,.2)
                    axisLine: {
                        lineStyle: {
                            color: "rgba(255,255,255,.2)"
                        }
                    },
                    // 修改分割线的颜色
                    splitLine: {
                        lineStyle: {
                            color: "rgba(255,255,255,.1)"
                        }
                    }
                }
            ],
            series: [
                {
                    name: '民用',
                    smooth: true,
                    type: 'line',
                    // 单独修改线的样式
                    lineStyle: {
                        color: "#00D2F6",
                        width: 1
                    },
                    // 填充区域
                    areaStyle: {
                        // 渐变色，只需要复制即可
                        color: new echarts.graphic.LinearGradient(
                            0,
                            0,
                            0,
                            1,
                            [
                                {
                                    offset: 0,
                                    color: "rgba(1, 132, 213, 0.4)"   // 渐变色的起始颜色
                                },
                                {
                                    offset: 0.8,
                                    color: "rgba(1, 132, 213, 0.1)"   // 渐变线的结束颜色
                                }
                            ],
                            false
                        ),
                        shadowColor: "rgba(0, 0, 0, 0.1)"
                    },
                    // 设置拐点 小圆点
                    symbol: "circle",
                    // 拐点大小
                    symbolSize: 8,
                    // 设置拐点颜色以及边框
                    itemStyle: {
                        color: "#00D2F6",
                        borderColor: "rgba(221, 220, 107, .1)",
                        borderWidth: 12
                    },
                    // 开始不显示拐点， 鼠标经过显示
                    showSymbol: false,
                    data: [130, 440, 150, 240, 180],
                },
                {
                    name: '工业',
                    smooth: true,
                    type: 'line',
                    // 单独修改线的样式
                    lineStyle: {
                        color: "#FFA92C",
                        width: 1
                    },
                    // 填充区域
                    areaStyle: {
                        // 渐变色，只需要复制即可
                        color: new echarts.graphic.LinearGradient(
                            0,
                            0,
                            0,
                            1,
                            [
                                {
                                    offset: 0,
                                    color: "rgba(0, 216, 135, 0.4)"
                                },
                                {
                                    offset: 0.8,
                                    color: "rgba(0, 216, 135, 0.1)"
                                }
                            ],
                            false
                        ),
                        shadowColor: "rgba(0, 0, 0, 0.1)"
                    },
                    // 设置拐点 小圆点
                    symbol: "circle",
                    // 拐点大小
                    symbolSize: 8,
                    // 设置拐点颜色以及边框
                    itemStyle: {
                        color: "#FFA92C",
                        borderColor: "rgba(221, 220, 107, .1)",
                        borderWidth: 12
                    },
                    // 开始不显示拐点， 鼠标经过显示
                    showSymbol: false,
                    data: [130, 220, 120, 440,],
                }
            ]
        }
        myChart.setOption(option);
        window.addEventListener("resize", function () {
            myChart.resize();
        });
    }

    map();

    function map(){
        $.get('./js/luojiang.json', function (geoJson) {
            let myChart = echarts.init(document.querySelector("#map"));
    
            echarts.registerMap('LJ', geoJson);
            let itemStyle={
                normal: {
                    borderColor: '#7AF1F0',
                    borderWidth: 1,
                    shadowColor: '#7AF1F0',
                    shadowBlur: 3,
                    areaColor: 'rgba(120,152,225, 0.05)',
                },
                emphasis: {
                    areaColor: 'rgba(120,152,225, 0.1)'
                },
                zoom:1.2
            }
           let color= ["#ED5454","#ED5454","#ED5454","#ED5454"]//['#ed8884', '#ff9f7f', '#006cff','#60cda0']//'#ff9f7f', '#0096ff', '#9fe6b8', '#32c5e9', '#1d9dff']
            var markPointData = [
                {name: '综合市场（德阳罗江兴能天然气有限公司）', coord: [104.50167195, 31.2950789], itemStyle: {normal: {color: colors.wxdy}}, },
                {name: '朝圣社区（德阳罗江兴能天然气有限公司）', coord: [104.50148342, 31.29523028], itemStyle: {normal: {color: colors.wxdy}}, },
                {name: '1788商业广场（德阳罗江兴能天然气有限公司）', coord: [104.50163986, 31.29511379], itemStyle: {normal: {color: colors.wxdy}}, },
                {name: '南街管线（德阳罗江兴能天然气有限公司）', coord: [104.50162482, 31.29510975], itemStyle: {normal: {color: colors.wxdy}}, },
                {name: '罗江高铁站前路桥梁跨越（四川石化江城燃气有限公司）', coord: [104.546391, 31.306738], itemStyle: {normal: {color: colors.wxdy}}, },
                {name: '上亿商贸城燃气管道占压（四川石化江城燃气有限公司）', coord: [104.546009, 31.307941], itemStyle: {normal: {color: colors.wxdy}}, },
                {name: '赛利康左侧桥梁跨越（四川石化江城燃气有限公司）', coord: [104.550112, 31.311628], itemStyle: {normal: {color: colors.wxdy}}, },
                {name: '金泰实业对面桥梁跨越（四川石化江城燃气有限公司）', coord: [104.550761, 31.315924], itemStyle: {normal: {color: colors.wxdy}}, },
                {name: '特驱饲料门前河燃气跨越（四川石化江城燃气有限公司）', coord: [104.545861, 31.324153], itemStyle: {normal: {color: colors.wxdy}}, },
                {name: '凯江村2组煤场段（四川石化江城燃气有限公司）', coord: [104.524463, 31.333326], itemStyle: {normal: {color: colors.wxdy}}, },
                {name: '调元镇场镇（罗江同辉燃气工程有限公司）', coord: [104.123456, 31.123456], itemStyle: {normal: {color: colors.wxdy}}, },
                {name: '略坪镇场镇（罗江同辉燃气工程有限公司）', coord: [104.399639, 31.331601], itemStyle: {normal: {color: colors.wxdy}}, },
                {name: '蟠龙镇场镇（罗江同辉燃气工程有限公司）', coord: [104.515800, 31.244985], itemStyle: {normal: {color: colors.wxdy}}, },
                {name: '御营镇场镇（罗江同辉燃气工程有限公司）', coord: [104.556938, 31.320244], itemStyle: {normal: {color: colors.wxdy}}, },
                {name: '慧觉镇场镇（罗江同辉燃气工程有限公司）', coord: [104.631417, 31.339504], itemStyle: {normal: {color: colors.wxdy}}, },
                {name: '金山镇（罗江县龙洲天然气有限责任公司）', coord: [104.541587, 31.38406], itemStyle: {normal: {color: colors.wxdy}}, },
                {name: '罗江县新盛镇天然气管理站', coord: [104.640269, 31.271009], itemStyle: {normal: {color: colors.wxdy}}, },
                {name: '德阳罗江兴能天然气有限公司', coord: [104.50166493, 31.2950279], itemStyle: {normal: {color: colors.wxdy}}, },
                {name: '四川石化江城燃气有限公司', coord: [104.547207, 31.305981], itemStyle: {normal: {color: colors.wxdy}}, },
                {name: '罗江同辉燃气工程有限公司', coord: [104.516076, 31.297624], itemStyle: {normal: {color: colors.wxdy}}, },
                {name: '罗江县龙洲天然气有限责任公司', coord: [104.541587, 31.38406], itemStyle: {normal: {color: colors.wxdy}}, },

            ];
            myChart.setOption(option = {
               
                title: {
                    text: '',
                    color:'#fff',
                    x:'20px',
                    y:'20px',
                    // subtext: '人口密度数据来自Wikipedia',
                    textStyle:{
                           color:'#fff'
                   }
                },
                tooltip: {
                    trigger: 'item',
                    formatter: '{b}<br/>'
                },
               
                geo: {
                    show: true,
                    map: 'LJ',
                    label: {
                        emphasis: {
                            show: false
                        }
                    },
                    roam: false,
                    itemStyle: {
                        normal: {
                            borderColor: '#4085d3',
                            // borderWidth: 1.5,
                            // shadowColor: '#000',
                            // shadowBlur: 50,
                            areaColor: 'rgba(120,152,225, 0.00',
                        },
                        emphasis: {
                            // areaColor: '#4f92fa'  //鼠标移上每一省份的颜色
                            areaColor: 'rgba(120,152,225, 0.1)',
                        }
                    }
                },
                
                series: [
                    {
                        
                        name: '香港18区人口密度',
                        type: 'map',
                        mapType: 'LJ', // 自定义扩展图表类型
                        label: {
                            show: true,
                            color:'#fff'
                        },
                        markPoint: { //图表标注。
                            symbolSize: window.subSymbolSize,
                            symbol: window.symbolPath,
                            symbolOffset: [0, '-50%'],
                            data: markPointData
                        },
                        itemStyle:itemStyle                        
                    },
                   
                ]
            });
        window.addEventListener("resize",function(){
            myChart.resize();
        });
        myChart.on('click',function(params){ //点击事件
           if(params.componentType==='markPoint'){
    
           }else{
    
           }
        });
    });
    }

    let legends = [
        {color: colors.wxdy, name:'危险点源'},
      ]
      let li = '';
      for(let legend of legends){
          li+=' <li> <i class="color-icon" style="background-color: '+ legend.color +';"></i>'+ legend.name +'</li>'
      }
      document.querySelector(".map-legend").innerHTML=li;
})()